Single-chip microcomputer

ABSTRACT

Flash ROMs operate at a speed slower than that of a CPU. In order to raise the operating speed of a single-chip microcomputer, therefore, interleaving is adopted and a plurality of flash ROMs are operated alternately to obtain an apparent operating speed equivalent to that of a CPU. Read clock generating circuits are placed in close proximity to clock input pins of respective ones of the flash ROMs and supply the flash ROMs with read clocks obtained by dividing down the frequency of a system clock. Delay ascribable to wiring is eliminated from the read clocks as a result.

FIELD OF THE INVENTION

[0001] This invention relates to a method of distributing a read clock in a single-chip microcomputer having memory macros placed on a chip.

BACKGROUND OF THE INVENTION

[0002]FIG. 6 illustrates a prior-art example of the layout of a single-chip microcomputer circuit in which a CPU and a plurality of flash ROMs are placed on a chip. Specifically, the circuit has a CPU 1, a plurality of flash ROM macros 2-1 to 2-4 for storing programs, and an interleave controller 3 for exercising control when a fetch bus is interleaved.

[0003] The CPU 1 and interleave controller 3 run on an externally applied system clock. The latter is supplied via a clock tree deployed on the chip. Clock skew of the clock supplied to each of the circuit devices by the clock tree is held within a certain limits.

[0004] The flash ROMs 2-1 to 2-4 operate at a speed lower than the operating speed of, e.g., the CPU 1. In order to raise the operating speed of a single-chip microcomputer, therefore, the usual practice is to adopt an interleave configuration and operate the plurality of flash ROMs 2-1 to 2-4 alternately, whereby an apparent operating speed equivalent to that of the CPU 1 can be obtained. Clocks obtained by frequency-dividing the system clock in the interleave controller 3 are used as read clocks supplied to the flash ROMs 2-1 to 2-4 at this time.

[0005]FIG. 7 is a block diagram illustrating the structure of a conventional single-chip microcomputer circuit in a case where the circuit has two flash ROMs 2-1 and 2-2, the former on an odd-numbered side and the latter on an even-numbered side.

[0006] The CPU 1 is connected to the flash ROMs 2-1 and 2-2 via the interleave controller 3. In the connection between the CPU 1 and the interleave controller 3, the CPU 1 outputs addresses for fetching programs that have been stored in the flash ROMs 2-1 and 2-2 and for accessing data, a control signal for controlling the status of the fetch bus and a control signal for controlling clock status and generating a clock. These addresses and signals are output to the interleave controller 3. At the time of consecutive access, data that has been read out of the flash ROM 2-1 on the odd-numbered side and the flash ROM 2-1 on the even-numbered side is output as a data signal from the interleave controller 3 to the CPU 1 while the interleave controller 3 switches between these items of data alternately.

[0007] In the connections between the interleave controller 3 and the flash ROMs 2-1 and 2-2, addresses that have been reconstructed within the interleave controller 3 in accordance with the flash ROM 2-1 on the odd-numbered side and the flash ROM 2-1 on the even-numbered side based upon the address data from the CPU 1 are output to the flash ROM 2-1 on the odd-numbered side and the flash ROM 2-1 on the even-numbered side, respectively. Further, the interleave controller 3 generates and supplies the read clocks for both the flash ROM 2-1 on the odd-numbered side and the flash ROM 2-1 on the even-numbered side. Data that has been read out of the flash ROMs 2-1 and 2-2 in sync with the read clocks from the interleave controller 3 are output from the flash ROMs 2-1 and 2-2 to the interleave controller 3.

[0008]FIG. 8 is a block diagram illustrating the structure of a conventional single-chip microcomputer circuit in a case where two sets of flash ROMs are adopted to conform to the layout of FIG. 6. This arrangement is similar to that of FIG. 7 except for the fact that two sets of flash ROMs (2-1 to 2-4) are disposed on the chip.

[0009] In these conventional circuit arrangements, the interleave controller 3 runs on a system clock whose frequency is the same as that of the CPU 1 using the control signal from the CPU 1. It is required, therefore, that set-up time and hold time of the signals be satisfied between the CPU 1 and interleave controller 3. As an operating frequency rises, however, the margin for set-up time diminishes. In a case where operating frequency is raised, therefore, the interleave controller 3 is placed close to the CPU 1. The interleave controller 3 provides address signals, which are reconstructed using the control signal from the CPU 1, generates the read clocks and supplies the address signals and read clocks to the flash ROMs 2-1 to 2-4.

[0010] Since the flash ROMs 2-1 to 2-4 occupy a large area, there is a limitation with regard to their positioning on the chip. In addition, the clock-input pins of each of the flash ROMs 2-1 to 2-4 are limited to a single location. After the placement of the flash ROMs 2-1 to 2-4 on the chip is decided, therefore, wiring is performed in such a manner that the read clocks from the interleave controller 3 to the flash ROMs 2-1 to 2-4 will be supplied directly to the flash ROMs over the shortest path. Thus it is so arranged that read-clock skew of each of the flash ROMs 2-1 to 2-4 will be held within fixed limits.

[0011] Other signals to be connected are also wired so as to avoid roundabout paths, thereby evening out skew.

[0012]FIG. 9 is a time chart illustrating the status of a conventional single-chip microcomputer at the time of a continuous fetch operation. The operation of this prior-art example will be described with reference to FIGS. 6 to 9.

[0013] A clock tree extends through a single-chip microcomputer and serves to hold skew between the clocks of a system clock (a) to within fixed limits.

[0014] Using the system clock (a), the interleave controller 3 generates both a read clock (d) for flash ROMs 2-2, 2-4 on the even side and a read clock (g) for flash ROMs 2-1, 2-3 on the odd side. These clocks are supplied to the flash ROMs over the shortest distances. Though wiring is implemented over the shortest distances, wiring of a certain length is nevertheless required from the interleave controller 3 to the flash ROMs 2-1 to 2-4. As a consequence, by the time the read clocks from the interleave controller 3 arrive at the clock input pins of the flash ROMs 2-1 to 2-4, they sustain a delay (referred to as “wiring delay”) ascribable to wiring length, as illustrated in FIG. 9.

[0015] Further, though read-out of data from the flash ROMs 2-1 to 2-4 starts in sync with the rising edges of the read clocks input to the flash ROMs 2-1 to 2-4, there is a large output delay with regard to the flash ROMs 2-1 to 2-4, as depicted in FIG. 9. Consequently, the moment at which read-out data Dn of address An designated by clock cycle (1) is finalized slides to clock cycle (2), as a result of which a further delay (wiring delay) ascribable to wiring length is inflicted upon signals from the output ends of the flash ROMs 2-1 to 2-4 to the CPU 1.

[0016] Accordingly, on the side of CPU 1, operation is so adapted that data at the address designated in clock cycle (I) is sampled at the rising edge of clock cycle (3) and data at the address designated in clock cycle (2) is sampled at the rising edge of clock cycle (4), as shown in FIG. 9. If the cycle of the system clock shortens, however, it becomes difficult to assure set-up time at the sampling points of the CPU 1 on these occasions as well.

SUMMARY OF THE DISCLOSURE

[0017] Thus, with the prior art described above, the read clocks for the flash ROM macros are generated by the interleave controller 3 and are supplied to the flash ROM macros by the routing of wiring traces. Therefore, in addition to output delay at the flash ROMs 2-1 to 2-4, wiring delay caused by the wiring also occurs. This delay due to wiring is the sum of delay of the read clock that triggers the output of the data and delay until the data arrives at the CPU 1 after being output. Such delay has a major influence upon the limit of the fetch operating frequency of the CPU 1.

[0018] For example, if the fetch operating frequency of the CPU 1 rises, a situation occurs in which the data at the address designated in the clock cycle (1) can no longer be sampled at the rising edge of the clock cycle (3) because the data will not yet have arrived at the CPU 1. With a high system clock frequency of this kind, data read-out from the flash ROMs 21 to 2-4 is not possible. The upper limit on the system clock that enables the CPU 1 to sample data is thus limited by the delay factors mentioned above.

[0019] A method considered to deal with one of these delay factors, namely output delay of the flash ROMs 2-1 to 2-4, is to increase the number of flash ROMs from which parallel read-out is possible. However, since wiring delay of the data up to its arrival at the CPU 1 following output of the data from the flash ROMs cannot be avoided, a technique that will not cause a delay in the output of the data is required.

[0020] Accordingly, an object of the present invention is to provide means for eliminating wiring delay to the maximum extent, thereby preventing the operating frequency of a single-chip microcomputer from declining in dependence upon the layout on the chip.

[0021] According to the present invention, the foregoing object is attained by providing a single-chip microcomputer in which a plurality of memory macros in an interleaved arrangement are placed on a chip, the microcomputer having a dedicated read clock generating circuit, to which a system clock is input directly, disposed in close proximity to each of the plurality of memory macros, wherein read clocks generated by the dedicated read clock generating circuit are supplied to respective ones of the plurality of memory macros.

[0022] Each read clock generating circuit ideally is placed close to a clock-input pin of the corresponding memory macro. Further, a system clock supplied to a CPU is supplied directly to each read clock signal generating circuit, and read clocks synchronized to the system clock are supplied to respective ones of the memory macros. At this time the operating clock of the memory macros is obtained by frequency dividing the system clock supplied to the CPU.

[0023] In accordance with this arrangement, the read clock that results in output of data does not sustain a delay ascribable to wiring. This means that data read-out timing can be advanced commensurately, enabling use of a system clock having a higher frequency. As a result, the operating frequency of the single-chip microcomputer can be raised and a higher processing speed becomes possible. Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.

BRIEF DESCRIPTION OF THE DRAWINGS

[0024]FIG. 1 is a diagram illustrating the circuit layout of a single-chip microcomputer according to an embodiment of the present invention;

[0025]FIG. 2 is a block diagram illustrating an example of the circuit structure of a single-chip microcomputer according to the embodiment;

[0026]FIG. 3 is a block diagram illustrating another example of the circuit structure of a single-chip microcomputer according to the embodiment;

[0027]FIG. 4 is a schematic view illustrating the relationship between the inputs and output of a read clock generating circuit used in this embodiment;

[0028]FIG. 5 is a time chart illustrating the status of the conventional single-chip microcomputer at the time of a consecutive fetch operation in this embodiment;

[0029]FIG. 6 is a diagram illustrating the circuit layout of a single-chip microcomputer according to the prior art;

[0030]FIG. 7 is a block diagram illustrating an example of the structure of a single-chip microcomputer circuit according to the prior art;

[0031]FIG. 8 is a block diagram illustrating another example of the structure of a single-chip microcomputer circuit according to the prior art;

[0032]FIG. 9 is a time chart illustrating the status of a prior-art single-chip microcomputer at the time of a consecutive fetch operation; and

[0033]FIG. 10 is a time chart illustrating the status of a prior-art single-chip microcomputer when a high-speed system clock is used in a consecutive fetch operation.

PREFERRED EMBODIMENTS OF THE INVENTION

[0034] A preferred embodiment of the present invention will now be described in detail with reference to the drawings.

[0035]FIG. 1 is a diagram illustrating the circuit layout of a single-chip microcomputer according to a preferred embodiment of the present invention.

[0036] As shown in FIG. 1, this single-chip microcomputer is similar to that of the prior art in that the microcomputer has the CPU 1, the plurality of flash ROM macros 2-1 to 2-4 for storing programs, and an interleave controller 3 for exercising control when a fetch bus is interleaved. According to the present invention, however, read clock generating circuits 4-1 to 4-4 for supplying respective ones of the flash ROM macros 2-1 to 2-4 with read clocks obtained by frequency-dividing the system clock are provided in close proximity to the clock input pins of the flash ROMs 2-1 to 2-4, respectively.

[0037] As mentioned above, the interleave controller 3 runs on a system clock whose frequency is the same as that of the CPU 1 using the control signal from the CPU 1. It is required, therefore, that set-up time and hold time of the signals be satisfied between the CPU 1 and interleave controller 3. As an operating frequency rises, however, the margin for set-up time diminishes. In a case where operating frequency is raised, therefore, the interleave controller 3 is placed close to the CPU 1.

[0038] Further, since the flash ROMs 2-1 to 2-4 occupy a large area, there is a limitation with regard to their positioning on the chip. In addition, the clock-input pins of each of the flash ROMs 2-1 to 2-4 are limited to a single location. According to the present invention, therefore, the read clock generating circuits 4-1 to 4-4, which frequency-divide the system clock, are placed very close to these clock input pins after the layout of the flash ROMs 2-1 to 2-4 is decided.

[0039] As in the example of the prior art, wiring is performed is such a manner that the signals to be connected will not follow meandering paths.

[0040] The CPU 1, interleave controller 3 and read clock generating circuits 4-1 to 4-4 are operated by the externally applied system clock. The latter operates through a clock tree extending through chip, and clock skew of the clock pulses is made to fall within fixed limits by the clock tree.

[0041] The flash ROMs 2-1 to 2-4 operate at a speed lower than the operating speed of the CPU 1, etc. In order to raise the operating speed of a single-chip microcomputer, therefore, an interleave configuration is adopted and the plurality of flash ROMs 2-1 to 2-4 are operated alternately, whereby an apparent operating speed equivalent to that of the CPU 1 can be obtained. Clocks obtained by frequency-dividing the system clock by the read clock generating circuits 4-1 to 4-4 are used as the clocks supplied to the flash ROMs 2-1 to 2-4 at this time.

[0042]FIG. 2 is a block diagram illustrating the structure of the single-chip microcomputer circuit of this embodiment in a case where the circuit has two flash ROMs 2-1 and 2-2, the former on an odd-numbered side and the latter on an even-numbered side. Provided within the single-chip microcomputer are the flash ROMs 2-1 and 2-2 for storing programs, the CPU 1, the interleave controller 3 for performing control when the fetch bus has an interleave configuration, and the read clock generating circuits 4-1 and 4-2 for generating the read clocks of the flash memories 2-1 and 2-2, respectively.

[0043] In the arrangement of FIG. 2, the CPU 1 outputs addresses for fetching programs that have been stored in the flash ROMs 2-1 and 2-2 and for accessing data, and a control signal for controlling the status of the fetch bus. These addresses and signal are output to the interleave controller 3. Data that has been read out of the flash ROM 2-1 on the odd-numbered side and the flash ROM 2-1 on the even-numbered side is output as a data signal from the interleave controller 3 to the CPU 1 while the interleave controller 3 switches between these items of data alternately.

[0044] The interleave controller 3 internally reconstructs addresses corresponding to the flash ROM 2-1 on the odd-numbered side and the flash ROM 2-1 on the even-numbered side and outputs these as addresses for accessing the flash ROM 2-1 on the odd-numbered side and the flash ROM 2-1 on the even-numbered side. Data that has been read out of the flash ROMs 2-1 and 2-2 in sync with the read clocks from the read clock generating circuits 4-1 and 4-2, respectively, are output from the flash ROMs 2-1 and 2-2 to the interleave controller 3.

[0045] The read clock generating circuits 4-1 and 4-2 supply the flash ROMs 2-1 and 2-2, respectively, with the read clocks, which are obtained by frequency-dividing the system clock. The CPU 1 controls the status of the clocks in the read clock generating circuits 4-1 and 4-2 and outputs a control signal for generating the read clocks.

[0046]FIG. 3 is a block diagram illustrating the structure of a conventional single-chip microcomputer circuit according to this embodiment in a case where two sets of flash ROMs are adopted to conform to the circuit layout of FIG. 1. This arrangement is similar to that of FIG. 2 except for the fact that two sets of flash ROMs (2-1 to 2-4) are disposed on the chip.

[0047]FIG. 4 is a schematic view illustrating the relationship between the inputs and output of the read clock generating circuits 4-1 and 4-2 used in this embodiment. The read clock generating circuits 4-1 and 4-2 divide the frequency of the system clock and change the clock cycle as necessary.

[0048] The system clock, an address signal for identifying odd and even addresses, a flash-ROM chip select signal and a signal for discriminating the reconstructed state of an address as by a jump instruction are input to each of the read clock generating circuits 4-1 and 4-2. If the flash ROM data is 4-byte data, then the address signal for identifying odd and even addresses may employ an address signal that is the third bit from the least significant.

[0049] The address signal for identifying odd and even addresses, the flash-ROM chip select signal and the signal for discriminating the reconstructed state of an address as by a jump instruction are input as control signals from the CPU 1. At the time of consecutive access, a clock having a cycle obtained by frequency dividing the system clock is output as the read clock. However, in a case where fetch is halted or a jump is made to access a non-consecutive address, the cycle of the read clock is lengthened.

[0050]FIG. 5 is a time chart illustrating the status of the single-chip microcomputer of this embodiment at the time of a consecutive fetch operation. Operation of this embodiment will be described with reference to FIGS. 2 and 5.

[0051] The clock tree is wired through the single-chip microcomputer and serves to hold skew between the clocks of a system clock (a) to within fixed limits.

[0052] Using the system clock (a), the read clock generating circuits 4-1 and 4-2 supply the flash ROM macros with a read clock (d) for the flash ROMs on the even side and a read clock (g) for the flash ROMs on the odd side while holding delay of both read clocks to the minimum.

[0053] Data (f) on the even-numbered side of the flash ROMs is output in sync with the rising edge of the read clock (d), which rises in sync with the rising edge of the clock cycle (1). However, since output delay of the flash ROMs is large, the data is not finalized by the time of the clock cycle (2), as illustrated in FIG. 5.

[0054] Consequently, if even a small delay is incurred when a read clock is supplied to a flash ROM, transmission of data to the fetch-data input terminal of the CPU 1 will be delayed. On the side of the CPU 1, data that has been read out from the address accessed in the clock cycle (1) is sampled at the rising edge of the clock cycle (3). Accordingly, the data must reach the CPU 1 after set-up time is secured with respect to the rising edge of the clock cycle (3) at which the data is sampled.

[0055] In this embodiment, skew of the system clock is assured by the clock tree. Further, by placing the read clock generating circuits 4-1 and 4-2 very close to the clock input pins of the flash ROMs 2-1 to 2-4, respectively, delay ascribable to wiring is eliminated from the read clocks of the flash ROMs to the maximum extent possible. As a result, even if the operating frequency of the single-chip microcomputer is made higher than that of the prior art, it is possible to achieve early arrival of data by an amount equivalent to set-up time from the data sampling point of the CPU 1. This means that processing speed can be raised.

[0056] According to the above embodiment, two flash ROMs are provided. However, the present invention is applicable also in a case where there are four flash ROMs, as shown in FIG. 3, or in a case where the number of flash ROMs is 2×n. Further, the invention is applicable also to other memory (ROM or RAM, etc.) macro configurations in which interleaving is adopted and a memory is accessed using a frequency-divided clock.

[0057] The meritorious effects of the present invention are summarized as follows.

[0058] Thus, according to the present invention, dedicated read clock generating circuits for respective ones of flash ROMs are disposed in close proximity to the clock input terminals of the flash ROMs in a single-chip microcomputer having a plurality of flash ROM macros. This makes it possible to minimize delay of the read clocks ascribable to wiring and to prevent the operating frequency of the single-chip microcomputer from declining in dependence upon the macro layout.

[0059] As many apparently widely different embodiments of the present invention can be made without departing from the spirit and scope thereof, it is to be understood that the invention is not limited to the specific embodiments thereof except as defined in the appended claims.

[0060] It should be noted that other objects, features and aspects of the present invention will become apparent in the entire disclosure and that modifications may be done without departing the gist and scope of the present invention as disclosed herein and claimed as appended herewith.

[0061] Also it should be noted that any combination of the disclosed and/or claimed elements, matters and/or items may fall under the modifications aforementioned. 

What is claimed is:
 1. A single-chip microcomputer in which a CPU, a plurality of memory macros and an interleave controller are placed on a chip, said microcomputer employing interleaving in which the plurality of memory macros are operated alternately based upon an externally applied system clock and including: a plurality of dedicated read clock generating circuits, to which the system clock is input directly, disposed in close proximity to respective ones of the plurality of memory macros; said dedicated read clock generating circuits supplying read clocks to respective ones of the plurality of memory macros.
 2. The microcomputer according to claim 1, wherein said dedicated read clock generating circuits are disposed in close proximity to clock input pins of respective ones of said memory macros.
 3. The microcomputer according to claim 1, wherein the system clock is supplied by a clock tree extending over the chip.
 4. The microcomputer according to claim 1, wherein each of said read clock generating circuits has the system clock, an address signal for identifying odd and even addresses of addresses, a memory-macro chip select signal and a signal for discriminating the reconstructed state of an address input thereto, for outputting read clock signals, which are obtained by frequency-dividing the system clock based upon these input signals, to corresponding ones of the memory macros.
 5. The microcomputer according to claim 1, wherein said interleave controller is disposed in close proximity to said CPU and has: a function for reconstructing addresses corresponding to the plurality of memory macros based upon address data from said CPU and outputting these addresses as addresses for accessing respective ones of the plurality of memory macros; and a function for outputting data, which has been read out of the plurality of memory macros, to said CPU as data signals while switching among these items of data.
 6. The microcomputer according to claim 1, wherein the memory macros are flash ROMs.
 7. The microcomputer according to claims 1, wherein the memory macros are ROMs or RAMs.
 8. The microcomputer according to claim 2, wherein the system clock is supplied by a clock tree extending over the chip.
 9. The microcomputer according to claim 2, wherein each of said read clock generating circuits has the system clock, an address signal for identifying odd and even addresses of addresses, a memory-macro chip select signal and a signal for discriminating the reconstructed state of an address input thereto, for outputting read clock signals, which are obtained by frequency-dividing the system clock based upon these input signals, to corresponding ones of the memory macros.
 10. The microcomputer according to claim 3, wherein each of said read clock generating circuits has the system clock, an address signal for identifying odd and even addresses of addresses, a memory-macro chip select signal and a signal for discriminating the reconstructed state of an address input thereto, for outputting read clock signals, which are obtained by frequency-dividing the system clock based upon these input signals, to corresponding ones of the memory macros.
 11. The microcomputer according to claim 2, wherein said interleave controller is disposed in close proximity to said CPU and has: a function for reconstructing addresses corresponding to the plurality of memory macros based upon address data from said CPU and outputting these addresses as addresses for accessing respective ones of the plurality of memory macros; and a function for outputting data, which has been read out of the plurality of memory macros, to said CPU as data signals while switching among these items of data.
 12. The microcomputer according to claim 3, wherein said interleave controller is disposed in close proximity to said CPU and has: a function for reconstructing addresses corresponding to the plurality of memory macros based upon address data from said CPU and outputting these addresses as addresses for accessing respective ones of the plurality of memory macros; and a function for outputting data, which has been read out of the plurality of memory macros, to said CPU as data signals while switching among these items of data.
 13. The microcomputer according to claim 4, wherein said interleave controller is disposed in close proximity to said CPU and has: a function for reconstructing addresses corresponding to the plurality of memory macros based upon address data from said CPU and outputting these addresses as addresses for accessing respective ones of the plurality of memory macros; and a function for outputting data, which has been read out of the plurality of memory macros, to said CPU as data signals while switching among these items of data.
 14. The microcomputer according to claim 2, wherein the memory macros are flash ROMs.
 15. The microcomputer according to claim 3, wherein the memory macros are flash ROMs.
 16. The microcomputer according to claim 4, wherein the memory macros are flash ROMs.
 17. The microcomputer according to claims 2, wherein the memory macros are ROMs or RAMs.
 18. The microcomputer according to claims 3, wherein the memory macros are ROMs or RAMs.
 19. The microcomputer according to claims 4, wherein the memory macros are ROMs or RAMs. 